4 research outputs found

    A History of BlockingQueues

    Get PDF
    This paper describes a way to formally specify the behaviour of concurrent data structures. When specifying concurrent data structures, the main challenge is to make specifications stable, i.e., to ensure that they cannot be invalidated by other threads. To this end, we propose to use history-based specifications: instead of describing method behaviour in terms of the object's state, we specify it in terms of the object's state history. A history is defined as a list of state updates, which at all points can be related to the actual object's state. We illustrate the approach on the BlockingQueue hierarchy from the java.util.concurrent library. We show how the behaviour of the interface BlockingQueue is specified, leaving a few decisions open to descendant classes. The classes implementing the interface correctly inherit the specifications. As a specification language, we use a combination of JML and permission-based separation logic, including abstract predicates. This results in an abstract, modular and natural way to specify the behaviour of concurrent queues. The specifications can be used to derive high-level properties about queues, for example to show that the order of elements is preserved. Moreover, the approach can be easily adapted to other concurrent data structures.Comment: In Proceedings FLACOS 2012, arXiv:1209.169

    Closer to reliable software: verifying functional behaviour of concurrent programs

    Get PDF
    If software code is developed by humans, can we as users rely on its absolute correctness?\ud \ud Today's software is large, complex, and prone to errors. Although many bugs are found in the process of testing, we can never slaim that the delivered software is bug-free. Errors still occur when software is in use; and errors exist that will perhaps never occur. Reaching an absolute zero bug state for usable software is practically impossible.\ud \ud On the other side we have mathematical logic, a very powerful machinery for reasoning and drawing conclusions based on facts. The power of mathematical logic is certainty: when a given statement is mathematically proven, it is indeed absolutely correct.\ud \ud When a technique for verifying software is based on logic, it allows one to mathematically prove properties about the program. These so-called formal verification techniques are very challenging to develop, but what they promise is highly valuable, and so, they certainly deserve close research attention. This thesis shows the benefits and drawbacks of this style of reasoning, and proposes novel techniques that respond to some important verification challenges.\ud \ud Still, mathematical logic is theory, and software is practice. Thus, formal verification can not guarantee absolute correctness of software, but it certainly has the potential to move us much closer to reliable software
    corecore